package com.fendaren.util;

import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.RandomUtils;

@Slf4j
public class SMSUtilsRetry {

    public static boolean sendSMS() {

        int num = RandomUtils.nextInt(0, 8);
        log.info("随机数为 num = {} ", num);

        switch (num) {
            case 0: {
                throw  new IllegalArgumentException("参数有误，不能为0");
            }
            case 1: {
                return true;
            }
            case 2: {

            }
        }
    }
}
